#ifndef AXISTEST_H
#define AXISTEST_H

#include <QMainWindow>
#include <deque>
#include <src/axis-tags/axistag.h>
#include <src/axis-tags/qcustomplot.h>
#include <src/main/common/shadowwidget.h>

class axisTest : public QMainWindow
{
    Q_OBJECT
public:
//    explicit axisTest(QWidget *parent = nullptr);
    explicit axisTest(QString titileName, QWidget *parent = nullptr);
    double staticVar;
    QCPTextElement *m_title;
//    QString titileName = "初始";
private slots:
  void timerSlot();
private:
  QCustomPlot *mPlot;
  QPointer<QCPGraph> mGraph1;
  QPointer<QCPGraph> mGraph2;
  AxisTag *mTag1;
  AxisTag *mTag2;
  QTimer mDataTimer;
  int i=0;
  int y=0;
  // 假设你有两个这样的队列来存储两个图表的数据
  std::deque<double> mGraph1DataQueue;
  std::deque<double> mGraph2DataQueue;
  void addDataAndUpdateQueues(QCPGraph *graph, double value);

};

#endif // AXISTEST_H
